package controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import view.MainWindow;
import model.Contact;
import model.DeleteModel;

/**
 * Call the model which delete a contact from the text file
 * @author Marie Morin
 *
 */
public class DeleteController implements ActionListener{
	
	private Contact c;
	private MainWindow w;
	
	public DeleteController(Contact c, MainWindow w){
		
		this.c = c;
		this.w = w;
	}

	/**
	 * Function called when the user click on the delete button in a contact profile page.
	 */
	@Override
	public void actionPerformed(ActionEvent arg0) {
		// TODO Auto-generated method stub
		
		DeleteModel delete = new DeleteModel(c, w);
		w.setLayoutNull();
		
		
	}
	
	

}
